package com.tfswue.lsh.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import jdk.jfr.DataAmount;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.util.List;
//@Component//将类交给spring管理
////主要作用是将配置文件中的属性值注入到该类中，参数是prefix指的是前缀，父类
//@ConfigurationProperties(prefix = "user")
//@Data
////    NoArgsConstructor 自动生成无参构造方法
////    @AllArgsConstructor 自动生成全参构造
//public class User {
//    private Integer id;
//    private String username;
//    private List<String> address;
//    private List<Grade> grades;
//}
//
//    @Data
//    static class  Grade {
//        private String subject;
//        private Integer score;
//
//}

@Data

@TableName("user")
public class User implements Serializable {
    @TableId(type = IdType.AUTO)

    private Integer id;

    private String username;
    private String email;
    private String password;
}